package com.util;

import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

public class PropertiesManager {

	private Properties pro;
	private InputStream is = null;

	//
	// public PropertiesManager(String propertyPath) {
	// pro = new Properties();
	// try {
	// pro.load(this.getClass().getResource(propertyPath).openStream());
	// } catch (IOException ex) {
	// System.out.println(ex.getMessage());
	// }
	// }
	//
	// public String getValue(String key) {
	// return pro.getProperty(key);
	// }
	public PropertiesManager(String propertyPath) {
		pro = new Properties();
		try {
			is = new FileInputStream(propertyPath);
			pro.load(is);
		} catch (IOException ioe) {
		}

	}

	public String getValue(String key) {
		return pro.getProperty(key);
	}

}
